All Packages Class Hierarchy This Package Previous Next Index
compare(Object)
message.
It is a special case of function objects.
A predicate's compare()
always returns a boolean whereas
a function object's perform()
always return
an Object
.
public class IsMale implements Predicate1 { public boolean compare(Object person) { return ((Employee)person).sex = "M"; } }This class will, when used with the
remove_copy
function
insert all male colleagues into the result container.
Copyright © 1996 Finn Bock
public abstract boolean compare(Object o)
All Packages Class Hierarchy This Package Previous Next Index